/*
 * @Author: your name
 * @Date: 2021-06-21 20:45:31
 * @LastEditTime: 2021-06-22 13:02:55
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \scb-control-program\APP\STM32Communication.h
 */
#ifndef __STM32COMMUNICATION_H
#define __STM32COMMUNICATION_H
#include "stm32f1xx_hal.h"
#include "stm32f1xx_hal_dma.h"
#include "string.h"
#include "stdio.h"
/********����F1�������ݸ�F4****/
#pragma pack(1)
typedef struct{
	uint8_t Start;//0x5A
	uint8_t Mode:2;
	uint8_t Check:1;
	uint8_t Default_bit:5;
	float Motor1;
	float Motor2;
	float Motor3;
	float Motor4;
	uint8_t Sum_check;
}chassis_board_t;
typedef union{
	chassis_board_t Chassis_Board;
	uint8_t send_data[19];
}chassis_board_u;
#pragma pack()
extern chassis_board_u Chassis_Send;
/********STM32F1****/
#define RECEIVE_SIZE    10
typedef struct{
	uint8_t Start;//0x5A
	uint8_t Mode:2;
	uint8_t Check:1;
	uint8_t Default_bit:5;
	uint8_t Sum_check;
}chassis_receive_t;
extern chassis_receive_t Chassis_Receive;
extern uint8_t MCU_Receive[RECEIVE_SIZE];
extern void BothMCU_Data_Process(void);
#endif 

